package com.entity;

import java.io.Serializable;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;


/**
 * The persistent class for the FUNCTIONALCLASSIFY_ database table.
 * 
 */
@Entity
@Table(name="FUNCTIONALCLASSIFY_")
@NamedQuery(name="Functionalclassify.findAll", query="SELECT f FROM Functionalclassify f")
public class Functionalclassify implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="FUNCTIONALCLASSIFY__FUNCTIONALCLASSIFYID_GENERATOR", sequenceName="SEQ",initialValue=1,allocationSize=1)
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="FUNCTIONALCLASSIFY__FUNCTIONALCLASSIFYID_GENERATOR")
	@Column(name="FUNCTIONALCLASSIFY_ID")
	private long functionalclassifyId;

	@Column(name="FUNCTIONALCLASSIFY_IFDELETE")
	private BigDecimal functionalclassifyIfdelete;

	@Temporal(TemporalType.DATE)
	@Column(name="FUNCTIONALCLASSIFY_INTODATE")
	private Date functionalclassifyIntodate;

	@Column(name="FUNCTIONALCLASSIFY_NAME")
	private String functionalclassifyName;

	//bi-directional many-to-one association to Function
	@OneToMany(mappedBy="functionalclassify")
	@JSONField(serialize=false)
	private List<Function> functions;

	public Functionalclassify() {
	}

	public long getFunctionalclassifyId() {
		return this.functionalclassifyId;
	}

	public void setFunctionalclassifyId(long functionalclassifyId) {
		this.functionalclassifyId = functionalclassifyId;
	}

	public BigDecimal getFunctionalclassifyIfdelete() {
		return this.functionalclassifyIfdelete;
	}

	public void setFunctionalclassifyIfdelete(BigDecimal functionalclassifyIfdelete) {
		this.functionalclassifyIfdelete = functionalclassifyIfdelete;
	}

	public Date getFunctionalclassifyIntodate() {
		return this.functionalclassifyIntodate;
	}

	public void setFunctionalclassifyIntodate(Date functionalclassifyIntodate) {
		this.functionalclassifyIntodate = functionalclassifyIntodate;
	}

	public String getFunctionalclassifyName() {
		return this.functionalclassifyName;
	}

	public void setFunctionalclassifyName(String functionalclassifyName) {
		this.functionalclassifyName = functionalclassifyName;
	}

	public List<Function> getFunctions() {
		return this.functions;
	}

	public void setFunctions(List<Function> functions) {
		this.functions = functions;
	}

	public Function addFunction(Function function) {
		getFunctions().add(function);
		function.setFunctionalclassify(this);

		return function;
	}

	public Function removeFunction(Function function) {
		getFunctions().remove(function);
		function.setFunctionalclassify(null);

		return function;
	}

}